#ifndef DATAGRAMPACKAGE_H
#define	DATAGRAMPACKAGE_H

class DatagramPackage {
    public:
        DatagramPackage(char *data, unsigned int length);
        DatagramPackage(char *data, unsigned int length, const char *address);
        DatagramPackage(char *data, unsigned int offset, unsigned int length);
        DatagramPackage(char *data, unsigned int offset, unsigned int length, const char *address);
        DatagramPackage(char *data, unsigned int offset, unsigned int length, const char *address, unsigned short port);
        virtual ~DatagramPackage();

        const char * getAddress();
        void setAddress(const char *address);
        unsigned short getPort();
        void setPort(unsigned short port);
        
        char * getData();
        void setData(char *data);
        void setData(char *data, unsigned int offset, unsigned int length);
        unsigned int getOffset();
        unsigned int getLength();
    private:
        const char *address;
        unsigned short port;
        
        char *data;
        unsigned int offset;
        unsigned int length;
};

#endif	/* DATAGRAMPACKAGE_H */
